<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui" >
    <p:idleMonitor onactive="PF('sessionTimeOutDialog').show();" timeout="#{session.maxInactiveInterval * 1000}" />
    <p:dialog header="Sesion expirada" 
              widgetVar="sessionTimeOutDialog" 
              modal="true" 
              closable="false" 
              width="400" 
              visible="false">
        <h:outputText value="La sesion expiro. Ingrese al sistema nuevamente" />
        <input id="confirmBackToLogin" type="button" value="Ir a login"
               onclick="window.location='#{facesContext.externalContext.requestContextPath}/seguridad/login.xhtml';" />
    </p:dialog>

</ui:composition>
